#
# Makefile for 'hint_test'.
#
# Type 'make' or 'make hint_test' to create the binary.
# Type 'make clean' or 'make clear' to delete all temporaries.
# Type 'make run' to execute the binary.
# Type 'make debug' to debug the binary using gdb(1).
#

# build target specs
CC = g++
CFLAGS = -O3 
OUT_DIR = release
LIBS =

# first target entry is the target invoked when typing 'make'
default: hint_test

hint_test: $(OUT_DIR)/hint.cpp.o $(OUT_DIR)/hint_test.cpp.o
	$(CC) $(CFLAGS) -o hint_test $(OUT_DIR)/hint.cpp.o $(OUT_DIR)/hint_test.cpp.o $(LIBS)

$(OUT_DIR)/hint.cpp.o: hint.cpp hint.h
	$(CC) $(CFLAGS) -o $(OUT_DIR)/hint.cpp.o -c hint.cpp

$(OUT_DIR)/hint_test.cpp.o: hint_test.cpp hint.h
	$(CC) $(CFLAGS) -o $(OUT_DIR)/hint_test.cpp.o -c hint_test.cpp

run:
	./hint_test 

debug:
	gdb ./hint_test

clean:
	@echo -n 'Removing all temporary binaries... '
	@rm -f hint_test $(OUT_DIR)/*.o
	@echo Done.

clear:
	@echo -n 'Removing all temporary binaries... '
	@rm -f hint_test $(OUT_DIR)/*.o
	@echo Done.

